require("../../utils/util.js");

Page({
    data: {
        value: "",
        logs: []
    },
    onLoad: function(a) {
        var e = this;
        console.log(a.name), wx.setNavigationBarTitle({
            title: a.name
        }), e.setData({
            value: a.name
        }), wx.request({
            url: "https://www.yehamson.xyz/idiom/idiom.php",
            data: {
                value: a.name
            },
            success: function(a) {
                console.log(a.data), e.setData({
                    logs: a.data
                });
            }
        });
    },
    onShareAppMessage: function(a) {
        var e = this.data.value;
        return a.from, {
            title: "成语：" + e,
            path: "/pages/logs/logs?name=" + e,
            imageUrl: "http://r.photo.store.qq.com/psc?/V10hbVEX45EgJM/TYYtfnaXgEmfmUb5MQ*YLe63T1WaypskLMkCiD9WCuFhrGsR9dklKgWoRpaJVLuUr*o1CeFZCgUyIiA7S3IY9gQyrr6gRIa*81bGyAwgyCM!/r",
            success: function(a) {}
        };
    },
    onShareTimeline: function(a) {
        var e = this.data.value;
        return a.from, {
            title: "成语：" + e,
            query: "name=" + e,
            imageUrl: "http://r.photo.store.qq.com/psc?/V10hbVEX45EgJM/TYYtfnaXgEmfmUb5MQ*YLe63T1WaypskLMkCiD9WCuFhrGsR9dklKgWoRpaJVLuUr*o1CeFZCgUyIiA7S3IY9gQyrr6gRIa*81bGyAwgyCM!/r",
            success: function(a) {}
        };
    }
});